package smedi.ismedi.mobile.bff.controller.inmail;

import com.smedi.ismedi.inmail.api.dto.request.OperationLogCreateRequest;
import com.smedi.ismedi.inmail.api.feign.RemoteOperationLogFeignApi;
import com.smedi.ismedi.web.starter.common.ResponseData;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 通知公告Controller
 *
 * @author jiangqinxuan
 * @date 2021/07/26
 */
@Slf4j
@Api(value = "操作日志" , tags = {"操作日志"})
@RequestMapping(value = "/mobilebff/v1/operation-log" )
@RestController
@RequiredArgsConstructor
public class OperationLogController {
    private final RemoteOperationLogFeignApi remoteOperationLogFeignApi;

    /**
     * 新建 操作日志
     *
     * @param operationLogCreateRequest 操作日志 新建 请求
     * @return ResponseData<AnnouncementResponse>
     */
    @ApiOperation(httpMethod = "POST" , value = "新建 操作日志" )
    @PostMapping(value = "/create" )
    ResponseData<Long> create(@Validated @RequestBody OperationLogCreateRequest operationLogCreateRequest) {
        return remoteOperationLogFeignApi.create(operationLogCreateRequest);
    }
}
